<template>
    <div class="item">
        <div class="header">
            <p>图片数量：8张
                <el-dropdown trigger="click" class="dropdown">
                    <span class="el-dropdown-link">
                        <i class="el-icon-arrow-down el-icon--right"></i>
                    </span>
                    <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item>
                            <i class="el-icon-edit"></i>
                            编辑相册
                        </el-dropdown-item>
                        <el-dropdown-item>
                            <i class="el-icon-delete"></i>
                            删除相册
                        </el-dropdown-item>
                    </el-dropdown-menu>
                </el-dropdown>
            </p>
        </div>
        <div class="content">
            <router-link :to="`albummanage/${currentAlbum.id}`">
                <img src="http://csmall.org//product/9/7/b/1/4/4/2/c/7c36b115-2986-4e87-9e8f-9bd21c564a97.jpg" alt="" >
            </router-link>
        </div>
        <div class="footer">
            {{currentAlbum.name}}
        </div>
    </div>
</template>

<script>
export default {
    props: ['currentAlbum'] // 自定义属性currentAlbum接收当前相册对象
}
</script>

<style scoped>
    .item {
        width: 200px; 
        height:200px; 
        border:1px solid #ccc;
        margin: 30px 0px 0px 30px; 
        display: inline-block;           
        background-color: #fff;                        
    }
    .item .header{
        border-bottom: 
        1px solid #ccc;
        height: 30px; 
        line-height: 30px; 
        padding: 0px 8px;
        font-size:0.9em;
    }
    .item .content {
        text-align: center;
        height: 140px;
        border-bottom: 1px solid #ccc;
    }
    .item .content img{
        height: 140px;
    }
    .item .footer{
        height: 30px; 
        text-align: center;
        line-height: 30px;
        font-size: 0.9em;
    }
    .item .header .dropdown{
        float: right;
    }
    .el-dropdown-link {
        cursor: pointer;
    }
    .el-icon-arrow-down {
        font-size: 12px;
    }

</style>
